

clear
set more 1
set type double

capture log using "log/AppendixTableB5_erpt_annual.log", replace


**************************************
*Table B4 - robustness of Table 5 erpt annual
*all dropping share_vehicle_other>10%
***************************************
*i. without ms
****************************************************************
use ../data/erpt_annual_estdata, clear
	merge m:1 vat cty_code using ../data/currency_vehicle, keep(match master) nogen	
	drop if vehicle_other==1


********************************
*ROBUSTNESS
*Table A5
*********************************************
*size dummies
gen large500=memp>=500
gen dxE_large500=dxE*large500
gen dxD_large500=dxD*large500	


*col1 - all countries with firm fe
	eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd ms_y lnmemp mphi_xeu share_other share_usd , cluster(cy) absorb(cp year vat)

*col2 - employment bin
	eststo: reghdfe duv_k dxE dxE_phi dxE_large500 dxE_share_other dxD dxD_phi dxD_large500 dxD_share_usd large500 mphi_xeu share_other share_usd , cluster(cy) absorb(cp year)


*different subsamples
*col3 - dif
	eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd mphi_xeu share_other share_usd if dif==1, cluster(cy) absorb(cp year)


*col4 - nondif
	eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd lnmemp mphi_xeu share_other share_usd if dif==0, cluster(cy) absorb(cp year)
	
*col5 - main product
	eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd lnmemp mphi_xeu share_other share_usd if main==1, cluster(cy) absorb(cp year)	

*col6 - oecd
	eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd lnmemp mphi_xeu share_other share_usd if oecd==1, cluster(cy) absorb(cp year)

*col7 - US only
	eststo: reghdfe duv_k  dxE_phi dxE_lnmemp dxE_share_other lnmemp mphi_xeu share_other if cty_code=="US", cluster(cy) absorb(cp year)

*col8 - non pegs and no dollar interactions
	eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other lnmemp mphi_xeu share_other if usd_peg==0, cluster(cy) absorb(cp year)


*col9 - drop 2020
eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd lnmemp mphi_xeu share_other share_usd if year<2020, cluster(cy) absorb(cp year)


use ../data/erpt_annual_estdata, clear

*col 10 - don't drop vehicle other
eststo: reghdfe duv_k dxE dxE_phi dxE_lnmemp dxE_share_other dxD dxD_phi dxD_lnmemp dxD_share_usd lnmemp mphi_xeu share_other share_usd , cluster(cy) absorb(cp year)



esttab using "../results/AppendixTableB6_erpt_robust.csv", order(dxE dxE_phi dxD_phi dxE_lnmemp dxD_lnmemp dxD_ms_y dxE_ms_y dxE_high dxD_high dxE_share_other dxD_share_usd lnmemp large500 mphi_xeu share_other share_usd) se b(3) se(3) r2 ar2 star(* 0.10 ** 0.05 *** 0.01) compress replace
eststo clear	
log close

